home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 3.9 KB | 127 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Content.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef CONTENT_H
- #define CONTENT_H
-
- // ----- FrameWork Includes -----
-
- #ifndef FWCONTNT_H
- #include "FWContnt.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class CClockPart;
-
- //========================================================================================
- // class CClockContent
- //========================================================================================
-
- class CClockContent : public FW_CContent
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- FW_DECLARE_AUTO(CClockContent)
-
- CClockContent(Environment* ev, CClockPart* part);
-
- virtual ~CClockContent();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- virtual void Externalize(Environment* ev,
- ODStorageUnit* storageUnit,
- FW_EStorageKinds storageKind,
- FW_CCloneInfo* cloneInfo);
- virtual FW_Boolean Internalize(Environment* ev,
- ODStorageUnit* storageUnit,
- FW_EStorageKinds storageKind,
- FW_CCloneInfo* cloneInfo);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- short GetClockType() const;
- void SetClockType(short clockType);
-
- FW_Boolean HasTickSound() const;
- FW_Boolean HasChimeSound() const;
-
- void ToggleTickSound();
- void ToggleChimeSound();
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- private:
- CClockPart* fClockPart;
-
- //--- part content data
- short fClockType;
- FW_Boolean fHasTickSound;
- FW_Boolean fHasChimeSound;
- };
-
- //----------------------------------------------------------------------------------------
- // CClockContent::GetClockType
- //----------------------------------------------------------------------------------------
- inline short CClockContent::GetClockType() const
- {
- return fClockType;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::SetClockType
- //----------------------------------------------------------------------------------------
- inline void CClockContent::SetClockType(short clockType)
- {
- fClockType = clockType;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::HasTickSound
- //----------------------------------------------------------------------------------------
- inline FW_Boolean CClockContent::HasTickSound() const
- {
- return fHasTickSound;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::HasChimeSound
- //----------------------------------------------------------------------------------------
- inline FW_Boolean CClockContent::HasChimeSound() const
- {
- return fHasChimeSound;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::ToggleTickSound
- //----------------------------------------------------------------------------------------
- inline void CClockContent::ToggleTickSound()
- {
- fHasTickSound = !fHasTickSound;
- }
-
- //----------------------------------------------------------------------------------------
- // CClockContent::ToggleChimeSound
- //----------------------------------------------------------------------------------------
- inline void CClockContent::ToggleChimeSound()
- {
- fHasChimeSound = !fHasChimeSound;
- }
-
- #endif
-